package com.bluesky.jwf.controller;

import com.bluesky.jwf.component.event.EventHandler;

/**
 * Controller in MVC, is a component which act as a bridge between view and
 * model. the View of course can work alone. But attaching a controller will
 * ease the work of matching the model and view.
 * 
 * @author hz00260
 * 
 * @param <M>
 * @param <V>
 */
public interface Controller<M, V> {
	void setModel(M model);

	M getModel();

	void setView(V v);

	V getView();

	void updateView();

	void updateModel();

	void setEventHandler(String eventName, EventHandler handler);

	void handleEvent(String eventName);
}
